﻿capital = 500


oob = "BRA_1936"
every_core_state = {
	ROOT = {
		add_to_array = { cores_at_game_start = PREV }
	}
}
IF = {
	limit = { has_dlc = "By Blood Alone" }
		set_air_oob = "BRA_1936_air_bba"
	ELSE = {
		set_air_oob = "BRA_1936_air_legacy"
		set_technology = {
			early_fighter = 1
		}
	}
}
recruit_character = BRA_getulio_vargas
###############################################################################
# ToA
###############################################################################
IF = {
	limit = {
		has_dlc = "Trial of Allegiance"
	}
	set_country_flag = BRA_toa_DLC


	add_ideas = {
		SMB_MTG_naval_arms_race_legacy
	}

	add_ideas = BRA_separatism_idea

	every_owned_state = {
		limit = {
			OR = {
				has_state_category = wasteland
				has_state_category = pastoral
				has_state_category = rural
				#TODO_JUNO: Check states below are correct after map changes implemented
				state = 498
				state = 499
			}
			NOT = {
				state = 961
				state = 962
				state = 963
				state = 964
				state = 965
				state = 966
				state = 967
				state = 968
				state = 496
			}
		}

		# Neglected State Modifier
		set_variable = { BRA_state_development_production_speed = -0.4 }
		set_variable = { BRA_state_development_local_building_slots_factor = -0.4 }
		set_variable = { BRA_state_development_local_factories = -0.4 }
		set_variable = { BRA_state_development_state_resources_factor = -0.4 }

		add_dynamic_modifier = {
			modifier = BRA_neglected_state_dynamic_modifier
		}
	}

	every_owned_state = {
		limit = {
			OR = {
				state = 498
				state = 499
				state = 935
				state = 936
				state = 937
			}
		}
		add_dynamic_modifier = {
			modifier = BRA_cangaceiro_state
		}
	}

	JUNO_set_shared_military_branch_defaults = yes

	# Undiversified Economy Modifier
	set_variable = { BRA_economy_production_efficiency_gain_factor = -0.2 }
	set_variable = { BRA_economy_production_max_efficiency_factor = -0.2 }
	set_variable = { BRA_economy_industrial_capacity_factor = -0.2 }
	
	set_variable = { BRA_weak_government_stability_factor = -0.15 }
	set_variable = { BRA_weak_government_pp_factor = -0.2 }
	set_variable = { BRA_weak_government_neutrality_factor = 0.02 }
	set_variable = { BRA_weak_government_command_power_factor = -0.4}

	set_variable = { BRA_coup_stability_factor = -0.05 }
	set_variable = { BRA_coup_communism_factor = 0.05 }
	set_variable = { BRA_coup_democratic_factor = 0 }
	set_variable = { BRA_coup_fascism_factor = 0 }
	set_variable = { BRA_coup_neutrality_factor = 0 }

	# Estado Novo Modifier
	set_variable = { BRA_estado_novo_stability_factor = 0.1 }
	set_variable = { BRA_estado_novo_fascism_factor = 0 }
	set_variable = { BRA_estado_novo_communism_factor = 0 }
	set_variable = { BRA_estado_novo_democratic_factor = 0 }
	set_variable = { BRA_estado_novo_fascism_factor = 0 }
	set_variable = { BRA_estado_novo_neutrality_factor = 0.2 }
	set_variable = { BRA_estado_novo_production_speed_buildings_factor = 0 }
	set_variable = { BRA_estado_novo_war_support_factor = 0 }
	set_variable = { BRA_estado_novo_recruitable_population_factor = 0 }
	set_variable = { BRA_estado_novo_consumer_goods_factor = 0 }
	set_variable = { BRA_estado_novo_political_power_factor = 0 }
	set_variable = { BRA_estado_novo_production_factory_max_efficiency_factor = 0 }
	set_variable = { BRA_estado_novo_industrial_capacity_factory = 0 }
	set_variable = { BRA_estado_novo_industrial_capacity_dockyard = 0 }
	set_variable = { BRA_estado_novo_production_speed_arms_factory_factor = 0 }
	set_variable = { BRA_estado_novo_production_speed_dockyard_factor = 0 }
	set_variable = { BRA_estado_novo_production_speed_industrial_complex_factor = 0 }

	# Estado Moderno Modifier
	set_variable = { BRA_estado_moderno_stability_factor = 0 }
	set_variable = { BRA_estado_moderno_neutrality_factor = 0 }
	set_variable = { BRA_estado_moderno_communism_factor = 0 }
	set_variable = { BRA_estado_moderno_democratic_factor = 0 }
	set_variable = { BRA_estado_moderno_fascism_factor = 0.2 }
	set_variable = { BRA_estado_moderno_production_speed_buildings_factor = 0 }
	set_variable = { BRA_estado_moderno_war_support_factor = 0 }
	set_variable = { BRA_estado_moderno_recruitable_population_factor = 0 }
	set_variable = { BRA_estado_moderno_consumer_goods_factor = 0 }
	set_variable = { BRA_estado_moderno_political_power_factor = 0 }
	set_variable = { BRA_estado_moderno_production_factory_max_efficiency_factor = 0 }
	set_variable = { BRA_estado_moderno_industrial_capacity_factory = 0 }
	set_variable = { BRA_estado_moderno_industrial_capacity_dockyard = 0 }
	set_variable = { BRA_estado_moderno_production_speed_arms_factory_factor = 0 }
	set_variable = { BRA_estado_moderno_production_speed_dockyard_factor = 0 }
	set_variable = { BRA_estado_moderno_production_speed_industrial_complex_factor = 0 }

	add_dynamic_modifier = { modifier = BRA_undiversified_economy_modifier }
	add_dynamic_modifier = { modifier = BRA_weak_government }
	add_dynamic_modifier = { modifier = BRA_aftermath_of_the_coup }

	set_politics = {
		ruling_party = democratic
		last_election = "1934.7.17"
		election_frequency = 48
		elections_allowed = yes
	}

	set_popularities = {
		democratic = 50
		neutrality = 25
		fascism = 15
		communism = 10
	}

	set_party_name = {
		ideology = neutrality
		name = BRA_military_party
		long_name = BRA_military_party_long
	}

	set_party_name = {
		ideology = democratic
		name = BRA_provisional_government
		long_name = BRA_provisional_government_long
	}

	country_event = {
		id = JUNO_brazil_events.153
		days = 30
		random_days = 15
	}
	#Political
	recruit_character = BRA_armando_de_sales_oliveira
	recruit_character = BRA_domingos_bras
	recruit_character = BRA_jose_linhares
	recruit_character = BRA_benedito_valadres
	recruit_character = BRA_alfred_agache
	recruit_character = BRA_joao_neves_da_fortuna
	recruit_character = BRA_joao_marques_de_reis
	recruit_character = BRA_francisco_campos
	recruit_character = BRA_filinto_muller
	recruit_character = BRA_indigenous_council
	recruit_character = BRA_lindolfo_collor
	recruit_character = BRA_jose_americo_de_almeida
	recruit_character = BRA_anisio_teixeira
	recruit_character = BRA_integralist_militia_general
	recruit_character = BRA_pedro_henrique
	recruit_character = BRA_pedro_de_alcantara
	recruit_character = BRA_alianca_nacional_libertadora_council
	recruit_character = BRA_minervino_de_oliveira
	recruit_character = BRA_olga_benario_prestes
	recruit_character = BRA_apolonio_de_carvalho
	recruit_character = BRA_war_industrialist
	recruit_character = BRA_captain_of_industry
	recruit_character = BRA_leoncio_basbaum
	recruit_character = BRA_geremia_lunarelli
	recruit_character = BRA_henry_ford
	recruit_character = BRA_gustavo_barroso
	recruit_character = BRA_miguel_reale
	recruit_character = BRA_oliveria_viana
	#Army
	recruit_character = BRA_augusto_fragoso
	recruit_character = BRA_alvaro_de_castro
	recruit_character = BRA_gois_monterio
	recruit_character = BRA_euclides_zenobio_da_costa
	recruit_character = BRA_jose_pessoa_cavalcanti_de_albuquerque
	recruit_character = BRA_henrique_teixeira_lott
	recruit_character = BRA_pereira_de_oliveira
	recruit_character = BRA_eduardo_guedes
	recruit_character = BRA_cristovao_de_castro
	recruit_character = BRA_milton_de_freitas
	recruit_character = BRA_candido_mariano
	recruit_character = BRA_olympio_falconiere_da_cunha
	recruit_character = BRA_floriano_de_lima_brayner
	#Navy
	recruit_character = BRA_henrique_aristides_guilhem
	recruit_character = BRA_silvio_de_noronha
	recruit_character = BRA_protogenes_guimaraes
	recruit_character = BRA_renato_de_almeida_guillobel
	recruit_character = BRA_alvaro_alberto_da_motta_e_silva
	#Cangaco
	recruit_character = BRA_lampiao

}
IF = {
	limit = {
		NOT = {
			has_dlc = "Trial of Allegiance"
		}
	}
	set_politics = {
		ruling_party = democratic
		last_election = "1934.7.17"
		election_frequency = 48
		elections_allowed = yes
	}
	set_popularities = {
		democratic = 50
		neutrality = 25
		fascism = 15
		communism = 10
	}
}
###############################################################################

# Starting tech
set_technology = {
	infantry_weapons = 1
	tech_support = 1	
	gw_artillery = 1
	basic_train = 1	
}

IF = {
	limit = {
		has_dlc = "No Step Back"
	}
	set_technology = {
		gwtank_chassis = 1
	}
}
IF = {
	limit = {
		NOT = { has_dlc = "No Step Back" }
	}
	set_technology = {
		gwtank = 1
	}
}
IF = {
	limit = {
		NOT = { has_dlc = "Man the Guns"}
	}
	set_technology = {
		early_submarine = 1
		early_destroyer = 1
		early_light_cruiser = 1
		early_heavy_cruiser = 1
		early_battleship = 1
		transport = 1
	}
	set_naval_oob = "BRA_1936_naval_legacy"
}
IF = {
	limit = { has_dlc = "Man the Guns"}
	set_technology = {
		basic_naval_mines = 1
		submarine_mine_laying = 1
		early_ship_hull_submarine = 1
		basic_ship_hull_submarine = 1
		early_ship_hull_light = 1
		early_ship_hull_cruiser = 1
		early_ship_hull_heavy = 1
		basic_battery = 1
		basic_torpedo = 1
		mtg_transport = 1
	}
	set_naval_oob = "BRA_1936_naval"	
}

set_country_flag = monroe_doctrine
recruit_character = BRA_plinio_salgado
recruit_character = BRA_luis_carlos_prestes
#recruit_character = BRA_armando_sales
recruit_character = BRA_eurico_gaspar_dutra
recruit_character = BRA_mascarenhas_de_morais
recruit_character = BRA_augusto_rademaker
recruit_character = BRA_agliberto_vieira
recruit_character = BRA_eduardo_gomes
recruit_character = BRA_salgado_filho
recruit_character = BRA_floriano_peixoto
#recruit_character = BRA_aristides_guilhem
#recruit_character = BRA_joao_neves_da_fontoura
recruit_character = BRA_epaminondas_dos_santos
recruit_character = BRA_moreira_lima
recruit_character = BRA_nero_fiuza_de_castro
recruit_character = BRA_artur_da_costa_e_silva
recruit_character = BRA_ismael_motta_paes
recruit_character = BRA_jorge_martins
recruit_character = BRA_newton_cavalcanti
recruit_character = BRA_afranio_de_mello_franco
recruit_character = BRA_washington_luis_pereira
recruit_character = BRA_osvaldo_aranha
recruit_character = BRA_arlindo_veiga_dos_santos
recruit_character = BRA_random_army_chief

set_convoys = 40

IF = {
	limit = {
		has_dlc = "Man the Guns"
	}
	create_equipment_variant = {
		name = "Minas Geras Class"
		type = ship_hull_heavy_1
		name_group = BRA_BB_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_heavy_battery_1
			fixed_ship_anti_air_slot = empty
			fixed_ship_fire_control_system_slot = ship_fire_control_system_0
			fixed_ship_radar_slot = empty
			fixed_ship_engine_slot = heavy_ship_engine_1
			fixed_ship_secondaries_slot = ship_secondaries_1
			fixed_ship_armor_slot = ship_armor_bb_1
			front_1_custom_slot = empty
			mid_1_custom_slot = ship_secondaries_1
			mid_2_custom_slot = ship_secondaries_1
			rear_1_custom_slot = ship_heavy_battery_1
		}
	}
	create_equipment_variant = {
		name = "Bahia Class"
		type = ship_hull_cruiser_1
		name_group = BRA_CL_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_light_battery_1
			fixed_ship_anti_air_slot = ship_anti_air_1
			fixed_ship_fire_control_system_slot = ship_fire_control_system_0
			fixed_ship_radar_slot = empty
			fixed_ship_engine_slot = cruiser_ship_engine_1
			mid_1_custom_slot = empty
			mid_2_custom_slot = ship_light_battery_1
			rear_1_custom_slot = empty
		}
	}
	create_equipment_variant = {
		name = "Para Class"
		type = ship_hull_light_1
		name_group = BRA_DD_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_battery_slot = ship_light_battery_1
			fixed_ship_anti_air_slot = empty
			fixed_ship_fire_control_system_slot = ship_fire_control_system_0
			fixed_ship_radar_slot = empty
			fixed_ship_engine_slot = light_ship_engine_1
			fixed_ship_torpedo_slot = ship_torpedo_1
			mid_1_custom_slot = empty
			rear_1_custom_slot = empty
		}
		obsolete = yes
	}
	create_equipment_variant = {
		name = "Humaytá Class"
		type = ship_hull_submarine_2
		name_group = BRA_SS_HISTORICAL
		parent_version = 0
		modules = {
			fixed_ship_torpedo_slot = ship_torpedo_sub_1
			fixed_ship_engine_slot = sub_ship_engine_2
			rear_1_custom_slot = ship_mine_layer_sub
		}
	}
}